package io;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class PrintWritedemo {
    public static void main(String[] args) throws IOException
    {
        PrintWriter pw = new PrintWriter("d:/a.txt");

        //PrintWriter pw = new PrintWriter(new FileWriter("d:/a.txt"));
        pw.println("hello");
        pw.println("world");
        pw.println(new Message(1,"标题"));

        pw.flush();
        pw.close();
    }
}
